package _17define;

public enum Season {
    SPRING(1,"春天"),
    SUMMER(2,"夏天"),
    AUTUMN(3,"秋天"),
    WINTER(4,"冬天");
    int id;
    String name;

    Season(int id, String name) {
        this.id = id;
        this.name = name;
    }
    public static Season findSeasonID(int SeasonID){
        Season type=null;
        Season[] seasons=Season.values();
        for (Season season : seasons) {
            if (season.id==SeasonID){
                type=season;
            }
            
        }
        return type;
    }
}
